package com.example.mybatisplusdemo;

import com.example.mybatisplusdemo.service.ProductService;
import com.example.mybatisplusdemo.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/*
 * 多数据源测试
 * */
@SpringBootTest
public class testDynamicDataSource {

    @Autowired
    private UserService userService;
    @Autowired
    private ProductService productService;

    @Test
    public void dynamicDataSourceTest() {
        System.out.println(userService.getById(4L));
        System.out.println(productService.getById(1L));
    }
}
